package cn.tedu.micro.demo.common.pojo.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("cart_tbl")  // TableName注解，告知框架该PO类数据库中对应的表名
public class CartPO {
    @TableId(value = "id", type = IdType.AUTO)  // TableId注解，告知框架该属性对应的字段为主键字段，type=IdType.AUTO，表主键自增
    private Integer id;
    @TableField("user_id")  // 只有value属性时，可省略属性名，只写值
    private Integer userId;
    @TableField("product_code")
    private String productCode;
    @TableField("count")
    private Integer count;
}
